<?php
		
		
			$arrId = -1;
			if(isset($_GET['checker']))
			{
				$arrId = $_GET['checker'];	
			
				$cItems = new CItems;
				
				$cType = new CType;			

				
				$count = 0 ; 
				if(is_array($arrId))
				{
					$mainContent = '<form action="processItems.php" method="post" name="form1" >
									<div id="content2">
										<div><span style="color:#FF0000"> Are you sure to deleting Item(s) </span.</div>
										<table border="0" width="98%" style="position:relative;border-collapse:collapse" align = "center">
										<tr>
											<td colspan="5" align="left" valign="middle" height="50px"> 
											 <img src="images/profile.png" style="float:left" border="0"/>
											<span class="mystyle1"> View all Items </span>		 </td>
										</tr>
										<tr bgcolor="#CCCCCC">
											<td width="5%"> #
											</td>
											<td width="5%">
												
											</td>
											<td width="30%" align="center">
												Images
											</td>
											<td width="40%" align="center">
												Info
											</td>
											<td align="center">	
												
											</td>
										</tr>';
							foreach ($arrId as $key => $value)				
							{
								$count ++;
								$item = $cItems ->CItemsDetail($value);
								$type = $cType ->CTypeDetail($item['id_type']);			
								$mainContent .='<tr>
												<td>'.$count.'
												</td>
												<td>
													<!--<input type="checkbox" name="checker[]" value="" checked="checked" disabled="disabled"> -->
														<input type="hidden" name="showItems[]" value="'.$item['id'].'">								
												</td>
												<td valign="middle" algin="center">
													<img src=../resources/'.$item['picture'].' width="120px" height="80px" border="0">
												</td>
												
												<td valign="top" align="left">
													<div><b>'.$item['name'].'</b></div>
													<div>Type: '.$type['name'].'</div>
													<div>Manufacture: '.$item['manufacture'].'</div>
													<div>Quantity: '.$item['status_sell'].'</div>
													<div>Price: '.$item['price'].'</div>
												</td>	
												
											</tr>';			
											
							}			
							$mainContent.='	
										<tr>
											<td colspan="4"	height="50px" align="center">
												<input id="input2"  type="submit" name="btn_ok" value="  OK  ">
												<input id="input2" name="btn_cancel" type="submit" value="  Cancel  " >
											</td>
										</tr>
							</table>
									</div>
									<input type="hidden" name="hItemAction" value="del">	
									</form>
									';
					}	
			}	
			if(isset ($_GET['idbpos']))
			{
				$cItems = new CItems;
				
				$item = $cItems ->CItemsDetail($_GET['idbpos']);
				
				
				
				$mainContent = '<form action="processItems.php" method="post" name="form1" >
									<div id="content2">
										<div><span style="color:#FF0000"> Are you sure to deleting Item(s) </span.</div>
										<table border="0" width="98%" style="position:relative;border-collapse:collapse" align = "center">
										<tr>
											<td colspan="5" align="left" valign="middle" height="50px"> 
											 <img src="images/profile.png" style="float:left" border="0"/>
											<span class="mystyle1"> View all Items </span>		 </td>
										</tr>
										<tr bgcolor="#CCCCCC">
											<td width="5%"> #
											</td>
											<td width="5%">
												
											</td>
											<td width="30%" align="center">
												Images
											</td>
											<td width="40%" align="center">
												Info
											</td>
											<td align="center">	
												
											</td>
										</tr>';
							
								
								$mainContent.='<tr>
												<td>1
												</td>
												<td>
													<!--<input type="checkbox" name="checker[]" value="'.$_GET['idbpos'].'" checked="checked" disabled="disabled"> -->
													<input type="hidden" name="showItems[]" value="'.$_GET['idbpos'].'">	
												</td>
												<td valign="middle" algin="center">
													<img src=../resources/'.$item['picture'].' width="120px" height="80px" border="0">
												</td>
												
												<td valign="top" align="left">
													<div><b>'.$item['name'].'</b></div>
													<div>Type: '.$item['id_type'].'</div>
													<div>Manufacture: '.$item['manufacture'].'</div>
													<div>Quantity: '.$item['status_sell'].'</div>
													<div>Price: '.$item['price'].'</div>
												</td>	
												
											</tr>';
							
							$mainContent.='	
										<tr>
											<td colspan="4"	height="50px" align="center">
												<input id="input2"  type="submit" name="btn_ok" value="  OK  ">
												<input id="input2" name="btn_cancel" type="submit" value="  Cancel  " >
											</td>
										</tr>
							</table>
									</div>
									<input type="hidden" name="hItemAction" value="del">	
							</form>		
									';
		}



?>